package spring.spring_aop.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import spring.spring_aop.aspect.MyAspect;

@RestController
@RequestMapping("t")
public class testController {

    @RequestMapping("t1")
    public String t1() throws InterruptedException {
        Thread.sleep(10);
        return "t1";
    }

    @RequestMapping("t2")
    public String t2() throws InterruptedException {
        Thread.sleep(10);
//        int i = 1 / 0;
        return "t2";
    }

    @MyAspect
    @RequestMapping("t3")
    public String t3() throws InterruptedException {

        Thread.sleep(10);
//        int i = 1 / 0;
        return "t2";
    }
}
